home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10511 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.0 KB  |  56 lines

  1. Newsgroups: comp.lang.c
  2. Path: uu4news.netcom.com!friend!news
  3. From: rich@kastle.com (Richard Krehbiel)
  4. Subject: Re: Standard question - pointer initialization
  5. Message-ID: <1996Mar18.113844.28711@friend.kastle.com>
  6. Sender: news@friend.kastle.com (News)
  7. Reply-To: rich@kastle.com
  8. Organization: Kastle Development Associates
  9. X-Newsreader: Forte Free Agent 1.0.82
  10. References: <4hk9un$906@hammer.msfc.nasa.gov> <4i52bk$5el@s02.pavilion.co.uk> <TANMOY.96Mar12211525@qcd.lanl.gov> <1996Mar14.113012.7984@friend.kastle.com> <TANMOY.96Mar15153247@qcd.lanl.gov>
  11. Date: Mon, 18 Mar 1996 11:39:01 GMT
  12.  
  13. tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) wrote:
  14.  
  15. >In article <1996Mar14.113012.7984@friend.kastle.com>
  16. >rich@kastle.com (Richard Krehbiel) writes:
  17. ><snip>
  18. >RK: 
  19. >RK: C not only lets you write really portable stuff, it also lets you
  20. >RK: write really platform/compiler/vendor-specific stuff, and that's a
  21. >RK: GOOD thing.
  22. >RK: 
  23.  
  24. >I agree, except at that point I stop calling it C :-)
  25.  
  26. Name the language you would you suggest someone use to write
  27. multiplatform networking code.  Obviously not C.
  28.  
  29. I have a single source base that compiles and executes on 4 OSes and
  30. three hardware architectures.  And in all cases it's the available C
  31. compiler that produces working code from the source.  What language
  32. shall I call it?
  33.  
  34. >More importantly, most often people write non-portable code where
  35. >portable code would be as good. Having ported code which was never
  36. >meant to be ported I think that is a chain of thought which ought to
  37. >be stamped out; and I for one will attempt to do so.
  38.  
  39. >Basically, there are four reasons why people write non-portable code:
  40.  
  41. >1) Ignorance
  42. >2) Laziness
  43. >3) Efficiency
  44. >4) Platform specific stuff.
  45.  
  46. >I accept only 3) and 4) as valid reasons.
  47.  
  48. I agree, but I call it "efficiency" (and I suspect you wouldn't) to
  49. use memset or calloc rather than typing struct.member=0 48 times when
  50. I know the target platforms will all be MS Windows.
  51.  
  52. --
  53. Richard Krehbiel, Kastle Systems, Arlington VA USA
  54. rich@kastle.com (work) or richk@mnsinc.com (personal)
  55.  
  56.